import type { PageParams } from '@/api/model/pageParams';
import { request } from '@/utils/request';

const page = async (params: PageParams) => {
    return request.post({
        url: '/foodType/page',
        data: params,
    });
};

const saveApi = async (data: any) => {
    return request.post({
        url: '/foodType/save',
        data,
    });
};

const deleteById = async (id: string) => {
    return request.get({
        url: `/foodType/delete/${id}`,
    });
};

const getOptions = async () => {
    return request.get({
        url: `/foodType/options`,
    });
};

export { deleteById, getOptions, page, saveApi };
